//tacticsTop

var myInterval;

function showOverlay() {
	$("#overlay").css("display", "");
}

function hideOverlay() {
	$("#overlay").css("display", "none");
}

function SetCookie(key, val) {
	document.cookie = key + "=" + val + ";";
}

function GetCookie(key) {
	var tmp = document.cookie + ";";
	var index1 = tmp.indexOf(key, 0);
	if (index1 != -1) {
		tmp = tmp.substring(index1, tmp.length);
		var index2 = tmp.indexOf("=", 0) + 1;
		var index3 = tmp.indexOf(";", index2);
		return (unescape(tmp.substring(index2, index3)));
	}
	return ("");
}

function resetlocate() {
	SetCookie("top", 0);
	SetCookie("left", 0);
}

function savelocate() {
	var top = document.body.scrollTop || document.documentElement.scrollTop
	// alert(top);
	SetCookie("top", top);
	var left = document.body.scrollLeft || document.documentElement.scrollLeft
	// alert(left);
	SetCookie("left", left);
}

function setScroll() {
	var top = GetCookie("top");
	// alert(top);
	var left = GetCookie("left");
	// alert(left);
	if (top && left) {
		window.scrollBy(left, top);
	}
	// clearInterval( myInterval );
}

$(function() {

	// myInterval = setInterval("setScroll()", 10);

});
